<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content='JBM_CallCenter,JBM,topjui,CallCenter'/>
    <meta name="description" content='家帮忙'/>
    <title>中超餐饮成本分析软件</title>
    <!-- 浏览器标签图片 -->
    <link rel="shortcut icon" href="../general/topjui/images/favicon.ico"/>
    <!-- TopJUI框架样式 -->
    <link type="text/css" href="../general/topjui/themes/default/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="../general/topjui/themes/default/topjui.blue.css" rel="stylesheet" id="dynamicTheme"/>
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="../general/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="../general/static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../general/static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="../general/static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心 -->
    <script type="text/javascript" src="../general/topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="../general/topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- 首页js -->
    <script type="text/javascript" src="../general/static/public/js/topjui.index.js" charset="utf-8"></script>

    <style>
        .nav-bar .nav-left{
            width: 230px;
            float: left;
        }
        .nav-bar .nav-right{
            width: 410px;
            float: right;
        }
        .nav-bar .nav-center{
            margin-left: 230px;
            margin-right: 245px;
            color: #fff;
            text-align: center;
            overflow: hidden;
        }
        .banner .nav-bar>div{
            height: 50px;
            line-height: 50px;
        }
        .nav-center ul{
            list-style-type: none;
            white-space: nowrap;
            overflow: hidden;
            display: inline-block;
            font-size: 0;
            position: relative;
            left: 0;
        }
        .nav-center ul li{
            display: inline-block;
            text-align: center;
            margin: 0;
            width: 100px;
        }
        .nav-center ul li a{
            text-decoration: none;
        }
        .nav-btn{
            display: inline-block;
            width: 20px;
            text-align: center;
            line-height: 50px;
            color: white;
            font-size: 20px;
        }
        .nav-group{
            position: relative;
            transition: all .3s;
            padding: 0;
        }
        .nav-group  .bannerMenu{
            padding: 5px 0;
        }
        .hide {
            display: none !important;
        }
    </style>
</head>
<body>
<div id="loading" class="loading-wrap">
    <div class="loading-content">
        <div class="loading-round"></div>
        <div class="loading-dot"></div>
    </div>
</div>
<div data-toggle="topjui-layout" data-options="id:'index_layout',fit:true">
    <div id="north" class="banner" data-options="region:'north',border:false,split:false"
         style="height: 50px; padding:0;margin:0; overflow: hidden;">
        <div class="nav-bar">
            <div class="nav-left webname">
                <span class="fa fa-envira" style="font-size:15px; padding-right:4px;"></span>
                	<span style="font-size:15px">中超成本分析系统</span>	
                <span class="collapseMenu " style="text-align: center;cursor: pointer;font-size: 18px;padding-left: 5px;">
                    <span class="fa fa-chevron-circle-left"></span>
                </span>
            </div>
            <div class="nav-right" style="text-align: right;">
                <span style=" padding-right: 8px; height: 50px; line-height: 50px;">
			            <a href="javascript:void(0)" data-toggle="topjui-menubutton"
			               data-options="iconCls:'fa fa-user',hasDownArrow:false"
			               style="color:#fff;line-height:28px;" id="showUser1">welcome：用户</a>|
			               
                        <a href="javascript:void(0)" id="mb3" data-toggle="topjui-menubutton"
                           data-options="menu:'#mm3',iconCls:'fa fa-cog',hasDownArrow:true" style="color:#fff;">设置</a>
                        <div id="mm3" style="width:74px;">
                            <!-- <div data-options="iconCls:'fa fa-info-circle'" onclick="javascript:changePwd()">个人信息</div>
                            <div class="menu-sep"></div> -->
                            <div data-options="iconCls:'fa fa-key'" onclick="javascript:changePwd()">修改密码</div>
                        </div>|
                        <a href="javascript:void(0)" onclick="exit()" data-toggle="topjui-menubutton"
                           data-options="iconCls:'fa fa-sign-out',hasDownArrow:false" style="color:#fff;">退出</a>
                    </span>
            </div>
            <div class="nav-center">
                <div style="overflow:hidden;position:relative;text-align:left;line-height: 50px;padding-left: 100px;">
		                <span class="fa fa-envira" style="font-size:25px; padding-right:4px;"></span>
		                	<span style="font-size:25px;">中超成本分析系统</span>	
                </div>
            </div>
        </div>
    </div>

    <div id="west"
         data-options="region:'west',split:true,width:230,border:false,headerCls:'border_right',bodyCls:'border_right'"
         title="" iconCls="fa fa-dashboard">
        <div id="RightAccordion"></div>
    </div>

    <div id="center" data-options="region:'center',border:false" style="overflow:hidden;">
        <div id="index_tabs" style="width:100%;height:100%">
            <div title="系统首页" iconCls="fa fa-home" data-options="border:true,iframe:true,
            content:'<iframe src=\'home.html\' scrolling=\'auto\' frameborder=\'0\' style=\'width:100%;height:100%;\'></iframe>'"></div>
        </div>
    </div>

    <div data-options="region:'south',border:true"
         style="text-align:center;height:30px;line-height:30px;border-bottom:0;overflow:hidden;">
        <span style="float:left;padding-left:5px;width:30%;text-align: left;" id="showUser2">当前用户：</span>
        <span style="padding-right:5px;width:40%">
            版权所有 © 2025
            <a href="#" target="_blank">copyright信息</a>
            <a href="#" target="_blank">中超物业版权所有</a>
        </span>
        <span style="float:right;padding-right:5px;width:30%;text-align: right;">版本：1.0.001</span>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
var OLD_PSD; //将当前登录密码保存到全局变量中
$(document).ready(function(){
	
});
function changePwd(){
	var opts={
		id: 'pwdDialog',
		title: '修改密码',
		width: 400,
		height: 300,
		iconCls: 'fa fa-key',
		href: '/web/login/user_modiPwd.html',
		buttons: [{
			text: '确定',
			iconCls: 'fa fa-save',
			btnCls: 'topjui-btn-green',
			handler: function(){
				if($('#pwdDialog').form('validate')){
					//debugger;
					var pwd1=$('#passwordnew').val();//新密码
					var pwd2=$('#password').val();//再次输入的密码
					debugger;
					console.log(USERINFO);
					OLD_PSD=USERINFO.password;
					if(pwd1!=pwd2){
						$.iMessager.alert('警告', '密码不一致，请重新输入！', 'messager-warning');
						$("#pwdDialog").form('reset');
						return;
					}else if(pwd1==OLD_PSD){
						$.iMessager.alert('警告', '新密码与原密码重复，请重新输入！', 'messager-warning');
						$("#pwdDialog").form('reset');
						return;
					}else{
						var formData={};
						formData.id=USERINFO.id;
						formData.password=pwd2;
						debugger;
						$.iMessager.progress({
								text: '正在操作...'
						});
						$.ajax({
							url: '/login/changePwd',
							type: 'post',
							data:formData,
							success:function(data) {
								debugger;
								if(data.status=='success'){
									USERINFO=data.login; //全局变量更新为修改了密码后的
									OLD_PSD=""; //比对变量也初始化
									$.iMessager.progress('close');
									//$.iMessager.alert('提示', '密码修改成功！', 'messager-info');
									$.iMessager.show({title: '提示', msg: '密码修改成功！请重新登录', timeout: 3000, showType: 'slide'});// '消息窗口'组件
								}else{
									$.iMessager.show({title: '我的error消息', msg: data.message, timeout: 5000, showType: 'slide'});// '消息窗口'组件
								}
								$("#pwdDialog").iDialog('close').form('reset');
								setTimeout(function(){ //3秒钟后跳转到登录页
									window.location.href='../login.html';
								},3000);
								
							},
							error:function(err){
								console.log("修改用户接口错误==",err);
								$.iMessager.show({title: '接口错误消息', msg: err, timeout: 5000, showType: 'slide'});// '消息窗口'组件
							},
							complete:function(){
								$.iMessager.progress('close');//无论成功与否，都会关闭进度条；
							}
						});
					}
				}
			}
		}, {
			text: '关闭',
			iconCls: 'fa fa-close',
			btnCls: 'topjui-btn-red',
			handler: function () {
				$("#pwdDialog").iDialog('close');
			}
		}]
	};
	$('#' + opts.id).iDialog('openDialog', opts);
};

//退出系统
function exit() {
	$.iMessager.confirm('提示', '确定要退出吗?', function (r) {
		if (r) {
			$.iMessager.progress({
				text: '正在退出中...'
			});
			//执行清session操作
			closeSession();
		}
	});
}
function closeSession(){
	$.ajax({
		url:"/login/closeSession",
		dataType:"JSON",
		type:"POST",
		data:{},
		success:function(data){
			debugger;
			//3秒钟之后执行跳转
			setTimeout(function(){
				window.location.href='/login.html'+location.search;
			},2000);
		},
		error:function(e,type){
			//3秒钟之后执行跳转
			setTimeout(function(){
				window.location.href = '/login.html' + location.search;
			},2000);
		}
	});
}

//获取当前登录用户信息的接口（可以取到菜单目录树说需要的数组和当前登录用户的信息，代码位于topjui.index.js文件560行左右）
</script>